/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.soc.cs5226.gui.entities;

import edu.soc.cs5226.gui.entities.util.Constants;

/**
 *
 * @author huijia
 */
public class DBParamFactory {
    public static DBParameter getDBParameter(String type) 
    {
        if (type.equalsIgnoreCase(Constants.SHAREDPOOL))
        {
            return new SharedPool();
        }
        
        else if (type.equalsIgnoreCase(Constants.BUFFERCACHE))
        {
            return new BufferCache();
        }
        
        else if (type.equalsIgnoreCase(Constants.REDOLOGBUFFER))
        {
            return new RedoLogBuffer();
        }
        
        else if (type.equalsIgnoreCase(Constants.SORTMEMORY))
        {
            return new SortMemory();
        }
        
        else if (type.equalsIgnoreCase(Constants.ROLLBACKSEGMENT))
        {
            return new RollbackSegment();
        }
        
        else
            return new SharedPool();
    }
}
